My guess would be...no..God screwed up when He created Satan...He was not looking into the future..and chose to ignore that fact that Satan would one day turn on Him and lead himself and His creation on course of self destruction.
Or yes......He had a reason for creating Satan and a purpose that we have just not figured out or been allowed to know yet. Perhaps even Satan was put on the job when a rebellion was nessesary for change...Like perhaps this one is rebellion against the withholding of information from others for power and control over them?
Whats your guess?